# Model relationships to be included in the group import/export
#
# This list _must_ only contain relationships that are available to both FOSS and
# Enterprise editions. EE specific relationships must be defined in the `ee` section further
# down below.
tree:
  group:
    - :milestones
    - :badges
    - labels:
      - :priorities
    - boards:
      - lists:
        - label:
          - :priorities
        - :board
    - members:
      - :user

included_attributes:
  user:
    - :id
    - :public_email
    - :username
  author:
    - :name
  iterations_cadence: &iterations_cadence_definition
    - :group_id
    - :created_at
    - :updated_at
    - :start_date
    - :next_run_date
    - :duration_in_weeks
    - :iterations_in_advance
    - :active
    - :automatic
    - :roll_over
    - :title
    - :description
  iterations_cadences: *iterations_cadence_definition
  iteration: &iteration_definition
    - :iid
    - :created_at
    - :updated_at
    - :start_date
    - :due_date
    - :group_id
    - :description
  iterations: *iteration_definition

excluded_attributes:
  group:
    - :id
    - :owner_id
    - :parent_id
    - :created_at
    - :updated_at
    - :runners_token
    - :runners_token_encrypted
    - :saml_discovery_token
    - :visibility_level
    - :trial_ends_on
    - :shared_runners_minute_limit
    - :extra_shared_runners_minutes_limit
  epics:
    - :state_id
  iterations_cadence: &iterations_cadence_definition
    - :id
  iterations_cadences: *iterations_cadence_definition
  iteration: &iteration_excluded_definition
    - :id
    - :title
    - :title_html
    - :project_id
    - :description_html
    - :cached_markdown_version
    - :iterations_cadence_id
  iterations: *iteration_excluded_definition

methods:
  labels:
    - :type
  label:
    - :type
  badges:
    - :type
  notes:
    - :type
  events:
    - :action
  lists:
    - :list_type
  epics:
    - :state

preloads:

export_reorders:

# EE specific relationships and settings to include. All of this will be merged
# into the previous structures if EE is used.
ee:
  tree:
    group:
      - epics:
        - :parent
        - :award_emoji
        - events:
          - :push_event_payload
        - label_links:
          - :label
        - notes:
          - :author
          - :award_emoji
          - events:
            - :push_event_payload
        - :resource_state_events
      - boards:
        - :board_assignee
        - :milestone
        - labels:
          - :priorities
        - lists:
          - milestone:
            - events:
              - :push_event_payload
      - iterations_cadences:
          - :iterations
